import time
from selenium import webdriver
from selenium.webdriver.chrome.webdriver import WebDriver

driver: WebDriver = webdriver.Chrome()

driver.get("https://www.baidu.com/")

time.sleep(3)

# 关键字
driver.find_element_by_id('kw').send_keys('python')
# 点击百度搜索
driver.find_element_by_id('su').click()
time.sleep(6)

driver.quit()